/* 基本重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background-color: #333;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #00aaff;
}

/* 语言切换器样式 */
.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid #555;
    background-color: transparent;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background-color: #00aaff;
    border-color: #00aaff;
    color: white;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease;
}

/* 首页部分样式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    color: white;
    padding-top: 70px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content .highlight {
    color: #00aaff;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: #00aaff;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0088cc;
}

/* 关于我部分样式 */
.about {
    padding: 100px 0;
    background-color: white;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    margin-right: 40px;
}

.about-image img {
    width: 100%;
    border-radius: 50%;
    max-width: 300px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 技能标签样式 */
.skills {
    margin-bottom: 60px;
}

.skills h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-tag {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    color: white;
    transition: transform 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-3px);
}

.skill-expert {
    background-color: #00aaff;
}

.skill-proficient {
    background-color: #4CAF50;
}

.skill-familiar {
    background-color: #FF9800;
}

/* 时间线样式 */
.timeline {
    margin-bottom: 60px;
}

.timeline h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #333;
}

.timeline-items {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-items::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background-color: #e0e0e0;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #00aaff;
    z-index: 1;
}

.timeline-date {
    flex: 1;
    text-align: right;
    padding-right: 40px;
    font-weight: bold;
    color: #666;
}

.timeline-content {
    flex: 1;
    padding-left: 40px;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #333;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
}

/* 个人成就样式 */
.achievements {
    text-align: center;
}

.achievements h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
}

.achievement-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f9f9f9;
    padding: 15px 30px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.achievement-item:hover {
    background-color: #f0f0f0;
}

.achievement-icon {
    width: 24px;
    height: 24px;
    background-color: #00aaff;
    border-radius: 50%;
    position: relative;
}

.achievement-icon::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.achievement-item span {
    font-size: 1.1rem;
    color: #333;
}

/* 项目展示部分样式 */
.projects {
    padding: 100px 0;
    background-color: #f4f4f4;
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.project-info p {
    color: #666;
    line-height: 1.6;
}

/* 联系我部分样式 */
.contact {
    padding: 100px 0;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #00aaff, #4CAF50);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
    position: relative;
}

.contact h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #00aaff, #4CAF50);
    margin: 20px auto 0;
    border-radius: 2px;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    margin-right: 40px;
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #495057;
}

.contact-info p strong {
    color: #333;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #00aaff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.social-links a:hover {
    background-color: #0088cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 136, 204, 0.3);
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(90deg, #00aaff, #4CAF50);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 170, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* 表单验证样式 */
.form-group input.error,
.form-group textarea.error {
    border-color: #ff4444;
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1);
}

.error-message {
    color: #ff4444;
    font-size: 0.85rem;
    margin-top: 5px;
    padding-left: 5px;
}

/* 成功消息样式 */
.success-message {
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    animation: slideIn 0.3s ease-out;
    position: relative;
    z-index: 10;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    font-size: 1rem;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    /* 移动端语言切换按钮样式 */
    .lang-switcher {
        position: fixed;
        top: 15px;
        right: 70px;
        z-index: 1001;
    }
    
    .lang-btn {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #333;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-content,
    .contact-content {
        flex-direction: column;
    }

    .about-image,
    .contact-info {
        margin-right: 0;
        margin-bottom: 30px;
    }

    /* 响应式联系表单 */
    .contact-content {
        padding: 20px;
    }

    .contact-info {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 14px;
    }

    .container {
        width: 90%;
    }

    /* 响应式技能标签 */
    .skill-tags {
        justify-content: center;
    }

    .skill-tag {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* 响应式时间线 */
    .timeline-items::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column;
        margin-bottom: 30px;
        padding-left: 70px;
        position: relative;
    }

    .timeline-item::before {
        left: 30px;
        top: 15px;
        transform: none;
    }

    .timeline-date {
        text-align: left;
        padding-right: 0;
        margin-bottom: 5px;
        font-size: 0.9rem;
    }

    .timeline-content {
        padding-left: 0;
    }

    .timeline-content h4 {
        font-size: 1.1rem;
    }

    /* 响应式个人成就 */
    .achievement-items {
        gap: 20px;
    }

    .achievement-item {
        padding: 12px 24px;
    }

    .achievement-item span {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .about h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}